Skip to content

Conversation

@aehart
Copy link

@aehart aehart commented Jan 12, 2026

PR description:

While preparing cms-sw#49779, I realized there are still a couple artifacts from before the TrackletEngineDisplaced, TripletEngine, and TrackletCalculatorDisplaced were combined into the TrackletProcessorDisplaced. So this PR:

  • includes the single commit that is part of Cleanup of obsolete lookup tables cms-sw/cmssw#49779
  • removes the TrackletCalculatorDisplaced as a processing module that can be executed; it is still retained as a base class for TrackletProcessorDisplaced
  • removes the StubTripletsMemory class altogether

PR validation:

Since the current wiring makes no reference to the TrackletCalculatorDisplaced or the StubTripletsMemory there is no change to the behavior of the extended tracking emulation, and the code compiles and runs as before.

Copy link
Collaborator

@tomalin tomalin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks OK to me, but I suggest @sarafiorendi checks it too before we merged it.

@aehart
Copy link
Author

aehart commented Jan 15, 2026

N.B.: I just found two orphan method declarations in Sector.h that no longer have a corresponding definition in Sector.cc, so I removed these in c74d45b.

@sarafiorendi
Copy link

I'm happy with the PR, just wondering if we shouldn't also remove these lines

if (output.substr(0, 7) == "projout") {
//output is on the form 'projoutL2PHIC' or 'projoutD3PHIB'
auto* tmp = dynamic_cast<TrackletProjectionsMemory*>(memory);
assert(tmp != nullptr);
constexpr unsigned layerdiskPosInprojout = 8;
constexpr unsigned phiPosInprojout = 12;
unsigned int layerdisk = output[layerdiskPosInprojout] - '1'; //layer or disk counting from 0
unsigned int phiregion = output[phiPosInprojout] - 'A'; //phiregion counting from 0
if (output[7] == 'L') {
assert(layerdisk < N_LAYER);
assert(phiregion < trackletprojlayers_[layerdisk].size());
//check that phiregion not already initialized
assert(trackletprojlayers_[layerdisk][phiregion] == nullptr);
trackletprojlayers_[layerdisk][phiregion] = tmp;
return;
}
if (output[7] == 'D') {
assert(layerdisk < N_DISK);
assert(phiregion < trackletprojdisks_[layerdisk].size());
//check that phiregion not already initialized
assert(trackletprojdisks_[layerdisk][phiregion] == nullptr);
trackletprojdisks_[layerdisk][phiregion] = tmp;
return;
}
}

?

@aehart
Copy link
Author

aehart commented Jan 20, 2026

I'm happy with the PR, just wondering if we shouldn't also remove these lines

if (output.substr(0, 7) == "projout") {
//output is on the form 'projoutL2PHIC' or 'projoutD3PHIB'
auto* tmp = dynamic_cast<TrackletProjectionsMemory*>(memory);
assert(tmp != nullptr);
constexpr unsigned layerdiskPosInprojout = 8;
constexpr unsigned phiPosInprojout = 12;
unsigned int layerdisk = output[layerdiskPosInprojout] - '1'; //layer or disk counting from 0
unsigned int phiregion = output[phiPosInprojout] - 'A'; //phiregion counting from 0
if (output[7] == 'L') {
assert(layerdisk < N_LAYER);
assert(phiregion < trackletprojlayers_[layerdisk].size());
//check that phiregion not already initialized
assert(trackletprojlayers_[layerdisk][phiregion] == nullptr);
trackletprojlayers_[layerdisk][phiregion] = tmp;
return;
}
if (output[7] == 'D') {
assert(layerdisk < N_DISK);
assert(phiregion < trackletprojdisks_[layerdisk].size());
//check that phiregion not already initialized
assert(trackletprojdisks_[layerdisk][phiregion] == nullptr);
trackletprojdisks_[layerdisk][phiregion] = tmp;
return;
}
}

?

When I try commenting out these lines, I get the following error:

----- Begin Fatal Exception 20-Jan-2026 07:31:35 CET-----------------------
An exception of category 'BadConfig' occurred while
   [0] Processing global begin Run run: 1
   [1] Calling method for module L1FPGATrackProducer/'l1tTTTracksFromExtendedTrackletEmulation'
Exception Message:
src/L1Trigger/TrackFindingTracklet/src/TrackletProcessorDisplaced.cc 105 Could not find output : projoutL1PHIA
----- End Fatal Exception -------------------------------------------------

This is because the TPDs still write out projections, unlike the TPs:

void TrackletConfigBuilder::writeProjectionMemoriesExt(std::ostream& os, std::ostream& memories, std::ostream&) {
for (auto& [seed, seed_info] : seedwires_.items()) {
for (auto& [region, region_info] : seed_info.items()) { //TPD instance
for (string proj : region_info["projections"]) { // projection
memories << "TrackletProjections: TPROJ_" << seed << region << "_" << proj << " [54]" << std::endl;
os << "TPROJ_" << seed << region << "_" << proj << " input=> TPD_" << seed << region << ".projout" << proj
<< " output=> MP_" << proj << ".projin" << std::endl;
}
}
}
}

At some point, we'll need to update TrackletConfigBuilder::writeProjectionMemoriesExt to resemble TrackletConfigBuilder::writeMergedProjectionMemories so that the projections are written by ProjectionCalculators instead. But that will be a bigger change, requiring more testing and validation, than I want to make in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants